#include <iostream>
using std::cout;
using std::endl;

namespace wd
{
int num = 100;

void func(){
    cout << "func" << endl;
}


namespace cpp
{
int num = 200;

void func(){
    cout << "cpp::func" << endl;
}
}//end of namespace cpp

}//end of namespace wd

void test0(){
    cout << wd::cpp::num << endl;
    wd::cpp::func();
}

void test1(){
    using namespace wd::cpp;
    cout << num << endl;
    func();
}

void test2()
{
    using wd::cpp::num;
    using wd::cpp::func;//只写函数名字
    cout << num << endl;
    func();
}

int main(void){
    test2();
    return 0;
}
